<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<div class="col-sm-2 col-lg-2">
    <div class="sidebar-nav">
        <div class="nav-canvas">
            <div class="nav-sm nav nav-stacked">
            </div>
            <ul class="nav nav-pills nav-stacked main-menu">
                <c:forEach items="${menuVo.groupSumMenus}" var="map">
                    <c:set var="isShow" value="false"/>
                    <c:forEach items="${map.value}" var="m">
                        <tags:permission url="${m.url}">
                            <c:set var="isShow" value="true"/>
                        </tags:permission>
                    </c:forEach>
                    <c:if test="${isShow}">
                    <li class="nav-header">${map.key.name}</li>
                    <c:forEach items="${map.value}" var="m">
                        <li <c:if test="${pageContext.request.requestURI eq m.url}">class="active"</c:if> >
                            <tags:permission url="${m.url}">
                                <a href="${ctx}${m.url}">&nbsp;&nbsp;&nbsp;&nbsp;<i class="${m.icon}"></i> ${m.name}</a>
                            </tags:permission>
                        </li>
                    </c:forEach>
                    </c:if>
                </c:forEach>
                <c:if test="${not empty menuVo.subMenus}">
                    <hr>
                </c:if>
                <c:forEach items="${menuVo.subMenus}" var="m">
                    <li <c:if test="${pageContext.request.requestURI eq m.url}">class="active"</c:if> >
                        <tags:permission url="${m.url}">
                            <a href="${ctx}${m.url}">&nbsp;&nbsp;&nbsp;&nbsp;<i class="${m.icon}"></i> ${m.name}</a>
                        </tags:permission>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>
</div>